﻿//*************************************************************************************
//* 作    者： 
//* 创建时间： 2021-12-04 08:30:28
//*  描    述：音乐可视化

//* ************************************************************************************
using UnityEngine;
using UFrame.Audio;

public class AudioVisualManager : AgentContext<AudioVisualManager>
{
    private AudioSpectrumCtrl m_spectrumCtrl;

    protected override void OnCreate()
    {
        base.OnCreate();
        m_spectrumCtrl = new AudioSpectrumCtrl(AudioSpectrumBandType.EightBand);
    }
    internal static float[] GetLevels()
    {
        return Instance.m_spectrumCtrl.Levels;
    }
    internal static float[] GetMeanLevels()
    {
        return Instance.m_spectrumCtrl.MeanLevels;
    }

    internal static float[] GetPeakLevels()
    {
        return Instance.m_spectrumCtrl.PeakLevels;
    }
}
